package CodeThree;

import java.util.Scanner;
/** @author ASUS */
public class Maxjumplength {
  public static void main(String[] args) {
    Scanner inputScan = new Scanner(System.in);
    int count = inputScan.nextInt();
    int[] numbers = new int[count];
    for (int i = 0; i < count; i++) {
      numbers[i] = inputScan.nextInt();
    }
    int maxjump = 0;
    int nowmaxjump;
    boolean canReach = true;
    for (int i = 0; i < count; i++) {
      // 记录下当前位置能跳的最远距离
      nowmaxjump = numbers[i] + i;
      // 更新能跳的最远距离
      maxjump = Math.max(nowmaxjump, maxjump);
      // 停止但是不是最后 判断是否能达到数组的最后一个位置
      if (maxjump == i && maxjump != count - 1) {
        canReach = false;
        break;
      }
    }
    if (canReach) {
      System.out.print("true");
    } else {
      System.out.print("false");
    }
  }
}
